<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2020/11/15
  Time: 17:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
保存之前：${requestScope.abc} <br/>
<c:set scope="request" var="abc" value="abcValue"></c:set>
保存之后：${requestScope.abc}
<hr>
<c:if test="${12==12}">
    <h1>12==12</h1>
</c:if>
<hr>
<c:set scope="request" var="height" value="179"></c:set>
<c:choose>
    <c:when test="${requestScope.height>190}">Superman</c:when>
    <c:when test="${requestScope.height>180}">High</c:when>
    <c:when test="${requestScope.height>170}">Ok</c:when>
    <c:otherwise>soso</c:otherwise>
</c:choose>
<hr>
<table border="1">
    <c:forEach begin="1" end="10" var="i">
        <tr>
            <td>第${i}行<br/></td>
        </tr>
    </c:forEach>
</table>
<hr>
<%
    request.setAttribute("Arr",new String[]{"111","121","131"});
%>
<c:forEach items="${requestScope.Arr}" var="i">
    ${i}<br/>
</c:forEach>
<hr>
<%
    Map<String,String> map = new HashMap<>();
    map.put("key1","value1");
    map.put("key2","value2");
    map.put("key3","value3");
    request.setAttribute("map",map);
%>
<c:forEach items="${requestScope.map}" var="entry">
    <h3>${entry}</h3>
</c:forEach>
</body>
</html>
